#ifndef Tui_TVBox_h
#define Tui_TVBox_h

#include "TMaskPanel.h" 


class TVBox:public TScrollPanel{
public:
    CREATE_FUNC(TVBox);
    TVBox();
    ~TVBox();
    int nMaxNum;
    
    
    static TVBox* create(xml_node<> * pItem);
    virtual  void initWidthConf(xml_node<> * pItem);
     
    virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent);
    void checkItemNum(int num);
    
    int renderStartIndex;
    int renderNum;
    
    
    virtual void setRenderTarget(CCObject *rec, SEL_MenuHandler selector);
    
    void moveToItem(TPanelItem*,bool check=false);
    void moveToTop();
    void moveToBottom();
    void layout();
    void layout(int num);
	void refreshPanel(int startIdx);
protected: 
    CCObject*       m_pRenderListener;
    SEL_MenuHandler    m_pRenderfnSelector;
protected:
    void expand(int num);
    string itemName;
    int itemHeight;
    int m_nDistance;

};
#endif
